package org.example.work.controller;

import jakarta.servlet.http.HttpServletResponse;
import org.example.work.utils.JwtUtil;
import org.springframework.web.bind.annotation.*;
import org.example.work.pojo.Result;

import java.util.Map;


@RestController
@RequestMapping("/subject")
public class SubjectController {
    @GetMapping("/list")
    public Result list(/*@RequestHeader("Authorization") String token, HttpServletResponse response*/) {
       /* //验证token
        try {
            Map<String, Object> claims = JwtUtil.parseToken(token);
            return Result.success("所有的科目数据");
        }catch (Exception e) {
            response.setStatus(401);
            return Result.error("未登录");
        }*/

        return Result.success("所有的科目数据");
    }
}




